Make DJ logs visible when running in foreground

I'm running `bundle exec foreman start` to fire off both worker and web processes. I see the web logs, but I don't see the worker logs. This change combines the logs into one place which jives nicely with 12-factor platforms.

Will Read преди 9 години
родител
ревизия
5527c5b07a
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      config/initializers/delayed_job.rb

+ 1 - 0
config/initializers/delayed_job.rb

@@ -5,6 +5,7 @@ Delayed::Worker.read_ahead = 5
5 5
 Delayed::Worker.default_priority = 10
6 6
 Delayed::Worker.delay_jobs = !Rails.env.test?
7 7
 Delayed::Worker.sleep_delay = (ENV['DELAYED_JOB_SLEEP_DELAY'].presence || 10).to_f
8
+Delayed::Worker.logger = Rails.logger
8 9
 
9 10
 # Delayed::Worker.logger = Logger.new(Rails.root.join('log', 'delayed_job.log'))
10 11
 # Delayed::Worker.logger.level = Logger::DEBUG